package cn.elwy.kit.file.action;

import org.eclipse.jface.action.Action;
import org.eclipse.swt.widgets.Shell;

import cn.elwy.kit.AppMain;
import cn.elwy.kit.file.dialog.FileRenameDialog;

public class FileRenameAction extends Action {

  public FileRenameAction() {
    this("重命名文件");
  }

  public FileRenameAction(String text) {
    setText(text);
  }

  @Override
  public void run() {
    Shell currentShell = AppMain.getCurrentShell();
    FileRenameDialog dialog = new FileRenameDialog(currentShell);
    dialog.open();
  }

}
